home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8244 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.9 KB  |  51 lines

  1. Path: erich.triumf.ca!bennett
  2. From: bennett@erich.triumf.ca (P.Bennett)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: *** Need help ASAP *** CLS, LOCATE, etc do not work with Borland 3.1 for dos
  5. Date: 2 Mar 1996 09:01 PST
  6. Organization: TRIUMF: Tri-University Meson Facility
  7. Distribution: world
  8. Message-ID: <2MAR199609010170@erich.triumf.ca>
  9. References: <4h96ne$3nb@fountain.mindlink.net>
  10. NNTP-Posting-Host: erich.triumf.ca
  11. News-Software: VAX/VMS VNEWS 1.50    
  12.  
  13. In article <4h96ne$3nb@fountain.mindlink.net>, mike_huwe@mindlink.bc.ca (Mike Huwe) writes...
  14. >I am using Borland C++ 3.1. When I run simple programs that clear the
  15. >screen or use the LOCATE command, they don't work. for example,
  16. >When I run a program the output stays at the top of the screen. When I run
  17. >the program again the new output is shown below the old output.
  18. >If I use the LOCATE macro, the statements are printed below
  19. >each other rather than at the specified cursor location.
  20.  
  21. >I used the following:
  22. >#define CLS printf("\033[2j")
  23. >#define LOCATE(r,c) printf("\033[%d;%dH",r,c)
  24.  
  25. These macros _maybe_ require that you have ANSI.SYS loaded - I think they will
  26. work on a VT-100 terminal in ANSI mode....
  27.  
  28. Borland provides the clrscr() and gotoxy() functions to do these tasks - they
  29. don't require ANSI.SYS, or any other special external programs.  You do need to
  30. #include <conio.h> to use them.
  31.  
  32. Note that _any_ special display operations such as this are compiler- or
  33. OS-specific.  Microsoft will provide similar functions, but likely uses
  34. different names.
  35.  
  36.  
  37. Peter Bennett VE7CEI                | Vessels shall be deemed to be in sight
  38. Internet: bennett@triumf.ca         | of one another only when one can be
  39. Packet: ve7cei@ve7kit.#vanc.bc.ca   | observed visually from the other
  40. TRIUMF, Vancouver, B.C., Canada     |                          ColRegs 3(k)
  41. GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.